<?php

namespace app\admin\model;

use app\common\controller\Backend;
use think\Exception;
use think\Model;
use think\Request;

class BaseModel extends Model
{
    protected function base($query)
    {
        $mpId = get_admin_applet_id();
        if($mpId == null)
            throw new Exception('未选择应用');
        $globalKey = [
            'mp_id'=>$mpId,
        ];
        $query->where($globalKey);
    }
}
